<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
    流程管理
    <small></small>
</h3>
<!-- END PAGE HEADER-->
<!-- BEGIN MAIN CONTENT -->
<div class="table" ng-show="!grid.edit && !grid.deploy">
    <div class="page-bar">
        <form class="form-inline" role="form" id="queryForm">
            <div class="form-group">
                <input type="text" class="form-control" ng-model="grid.query.processName" placeholder="流程名称">
            </div>
            <button class="btn btn-select" ng-click="grid.query()"><i class="fa fa-search"></i> 搜索</button>
            </button>
        </form>
    </div>
    <div class="portlet">
        <div class="portlet-title">
            <div class="caption">
                流程列表
                <button class="btn btn-success" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增 </button>
                <button class="btn btn-success" ng-click="grid.openImport()"><i class="fa fa-plus"></i> 导入 </button>
            </div>
        </div>
        <div class="portlet-body">
            <table ed-grid class="table table-striped table-bordered table-advance table-hover"
                   ed-url="bpm/models.do" ed-model="model">
                <thead>
                <tr>
                    <th ed-data="_index"></th>
                    <th ed-data="name">名称</th>
                    <th ed-data="category | code : 'bpmtype'">类型</th>
                    <th ed-data="createTime">创建时间</th>
                    <th ed-data="lastUpdateTime">最后更新时间</th>
                    <th ed-data="_edit" ed-width="300px">操作</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>
<div class="portlet light bordered edit" ng-show="grid.edit">
    <div class="portlet-title">
        <div class="caption">
            <i class="icon-equalizer font-red-sunglo"></i>
            <span class="caption-subject font-red-sunglo bold uppercase">流程编辑</span>
        </div>
        <div class="actions">
            <a class="btn btn-circle btn-icon-only btn-default" href="javascript:;" ng-click="grid.cancel();">
                <i class="icon-action-undo"></i>
            </a>
        </div>
    </div>
    <div class="portlet-body form">
        <!-- BEGIN FORM-->
        <form action="#" class="form-horizontal">
            <div class="form-body">
                <div class="form-group">
                    <label class="col-md-3 control-label">名称</label>

                    <div class="col-md-4">
                        <input type="text" class="form-control" ng-model="model.name">
                    </div>
                </div>
                <!--<div class="form-group">
                    <label class="col-md-3 control-label">key</label>

                    <div class="col-md-4">
                        <input type="text" class="form-control" ng-model="model.key">
                    </div>
                </div>-->
                <div class="form-group">
                    <label class="col-md-3 control-label">类型</label>

                    <div class="col-md-4">
                        <select class="form-control" ng-model="model.category" ng-options="opt.value as opt.name for opt in options.bpmtype"></select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">描述</label>

                    <div class="col-md-4">
                        <textarea class="form-control" ng-model="model.metaInfo"></textarea>
                    </div>
                </div>
            </div>
            <div class="form-actions">
                <div class="row">
                    <div class="col-md-offset-3 col-md-4">
                        <button type="button" class="btn green" ng-click="grid.save()"><i class="fa fa-save"></i> 保存</button>
                        <button type="button" class="btn default" ng-click="grid.cancel()"><i class="fa fa-times"></i> 取消</button>
                    </div>
                </div>
            </div>
        </form>
        <!-- END FORM-->
    </div> 
</div>
<div class="portlet light bordered edit" ng-show="grid.deploy">
    <div class="portlet-title">
        <div class="caption">
            <i class="icon-equalizer font-red-sunglo"></i>
            <span class="caption-subject font-red-sunglo bold uppercase">流程导入</span>
        </div>
        <div class="actions">
            <a class="btn btn-circle btn-icon-only btn-default" href="javascript:;" ng-click="grid.cancelImport()">
                <i class="icon-action-undo"></i>
            </a>
        </div>
    </div>
    <div class="portlet-body form">
        <!-- BEGIN FORM-->
        <div class="portlet-body form">
        <!-- BEGIN FORM-->
        <form class="form-horizontal">
            <div class="form-body">
 				<div class="form-group">
                    <label class="col-md-3 control-label">类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型</label>
                    <div class="col-md-4">
                        <select class="form-control" name="category" ng-model="model.category" ng-options="opt.value as opt.name for opt in options.bpmtype"></select>
                    </div>
                </div>
 				<div class="form-group">
                    <label class="col-md-3 control-label">选择文件</label>
                    <div class="col-md-4">
			            <div ed-uploader ng-model="model.modelFile" ed-upload-dir="tmp" style="padding-left:7px;"></div>
                    </div>
                </div>
            </div>
            <div class="form-actions">
                <div class="row">
                    <div class="col-md-offset-3 col-md-4">
                        <button type="button" id="sbtn" class="btn green" ng-click="grid.importFile()"><i class="fa fa-save"></i> 导入流程</button>
                        <button type="button" class="btn default" ng-click="grid.cancelImport()"><i class="fa fa-times"></i> 取消</button>
                    </div>
                </div>
            </div>
        </form>
       </div>
     </div>
</div>
<!-- END MAIN CONTENT -->
<!-- BEGIN MAIN JS -->
<script>
</script>
<!-- END MAIN JS -->